<?php include 'home_search_result_css.php'; ?>

<center>
    <div class="div_content_all">
<!--        <img src="/public/images/them1/menu/globe_top.jpg">-->

        <?php include 'top_menu2.php'; ?>

        <div class="clear">&nbsp;</div>
        <div id="breadcrumb">
            <div id="sub-menu" class="fl"></div>
            <div class="fr callcenter">
                &nbsp;
            </div>
            <div class="clear">&nbsp;</div>
        </div>

        <div id="content">
            <div class="divLayoutSearch">
                <div class="resultSearchLeft">
                    <div class="boxMsgResSearch">
                        <!--                        <div class="disCountSearch">13676</div>-->
                        <div class="infoResultSearch">Kết quả với từ khóa "<strong><?php echo $keyword; ?></strong>"</div>
                    </div>
                    <div style="font-size: 12px;font-weight: bold;color: #7B868A;padding-left: 10px;padding-top: 10px;">
                        Tìm kiếm trong sản phẩm
                    </div>

                    <div class="left_res">
                        <ul>
                            <?php foreach ($aryProductCategory as $key => $value) {
                            ?>
                            <li class="<?php echo ($value['product_category_id'] == $catId) ? 'active' : '';?>">
                                <a href="<?php echo $root_page;?>/search/?keyword=<?php echo $keyword;?>&catId=<?php echo $value['product_category_id'];?>&type=product" title="<?php echo $value['product_category_name']; ?>"><span><?php echo $value['product_category_name']; ?><font style="color: #7b868a;font-weight: normal;">(<?php echo $value['product_category_total']; ?>)</font></span></a>
                                </li>
                            <?php } ?>
                        </ul>
                    </div>
                    <div class="clear">&nbsp;</div>
                    <div style="font-size: 12px;font-weight: bold;color: #7B868A;padding-left: 10px;padding-top: 10px;">
                        Tìm kiếm trong tin tức
                    </div>
                    <div class="left_res">
                        <ul>
                            <li class="<?php echo ($type == 'news') ? 'active' : '';?>">
                                <a href="<?php echo $root_page;?>/search/?keyword=<?php echo $keyword;?>&type=news" title="Tin tức"><span>Tin tức<font style="color: #7b868a;font-weight: normal;">(<?php echo $countTotalNews; ?>)</font></span></a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div style="padding: 0 0 5px 0;" class="searchContents">
                    <div class="NewsList">
                        <div class="search_area" id="search_area">

                            <div class="searchArea" id="searchArea">

                                <div id="bysearch">
                                    <div class="">
                                        <div class="">
                                            <div class="content">
                                                <!-- Products -->
                                                <div class="productlist">
                                                    <div class="list2">
                                                        <?php if($type == 'product' || $type == ''){?>
                                                        <?php foreach ($aryProductSearch as $key => $value) {?>
                                                        <div class="item">
                                                            <div class="left">
                                                                <div class="bordernews">
                                                                    <div class="imagenews">
                                                                        <a href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id']?>/<?php echo $value['product_title_filter'];?>.html" title="<?php echo $value['product_title'];?>"><img height="80px" src="<?php echo $sub_domain;?>/images/upload/thumbnail/<?php echo $value['product_main_image'];?>" title="<?php echo $value['product_title'];?>" alt="<?php echo $value['product_title'];?>"></a>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="right">
                                                                <div class="colnews2">
                                                                    <div class="name">
                                                                        <a href="<?php echo $root_page;?>/sanpham/<?php echo $value['product_id']?>/<?php echo $value['product_title_filter'];?>.html" title="<?php echo $value['product_title'];?>"><?php echo $value['product_title'];?></a>
                                                                    </div>
                                                                    <?php include 'overlay_chat.php';?>
                                                                    <div class="product_price">
                                                                        <span class="search_span_product"><?php echo ($value['product_price_vnd'] != 0) ? number_format($value['product_price_vnd'], 0, ',', '.').'&nbsp;VNĐ' : '<a onclick="MyController.OverlayChat();" style="color: red;">Call</a>'; ?>
                                                                            </span>
                                                                    </div>
                                                                    <div>
                                                                        <?php echo strip_tags($value['product_highlight']);?>
                                                                    </div>
                                                                    <div class="tag">

                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="clear">&nbsp;</div>
                                                        </div>
                                                        <?php } ?>
                                                        <?php }else if($type == 'news'){ ?>
                                                            <?php foreach ($arySearchNews as $key => $value) {?>
                                                                <div class="item">
                                                            <div class="left">
                                                                <div class="bordernews">
                                                                    <div class="imagenews">
                                                                        <a href="<?php echo $root_page;?>/chitiet/<?php echo $value['news_id']?>/<?php echo $value['news_title_filter'];?>.html"><img height="80px" src="<?php echo $sub_domain;?>/images/upload/thumbnail/<?php echo $value['news_main_image'];?>" title="<?php echo $value['news_title'];?>" alt="<?php echo $value['news_title'];?>"></a>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="right">
                                                                <div class="colnews2">
                                                                    <div class="name">
                                                                        <a href="<?php echo $root_page;?>/chitiet/<?php echo $value['news_id']?>/<?php echo $value['news_title_filter'];?>.html" title="<?php echo $value['news_title'];?>"><?php echo $value['news_title'];?></a>
                                                                    </div>
                                                                    <div>
                                                                        <?php echo strip_tags($value['news_content_filter']);?>
                                                                    </div>
                                                                    <div class="tag">

                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="clear">&nbsp;</div>
                                                        </div>
                                                            <?php } ?>
                                                        
                                                        <?php } ?>
                                                    </div>
                                                    <div class="pagination">
                                                        <?php echo $strPaging;?>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</center>
<div class="clear">&nbsp;</div>
<?php include 'home_footer.php'; ?>
